home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PRINTER
/
LJPRT1.ARJ
/
LJPRT.DOC
< prev
next >
Wrap
Text File
|
1991-03-25
|
60KB
|
1,548 lines
LJprt
LASERJET TEXT FILE PRINT UTILITY
Ver 1.00
March 1991
J. Lawrence Nafziger
P.O. Box 8351
Norfolk Virginia, 23503-0351
CompuServe 73075,1474
C O N T E N T S
DESCRIPTION & FEATURES . . . . . . . . . . . . 1
STARTING & QUITTING LJprt . . . . . . . . . . . 2
USING LJprt In Automatic Mode . . . . . . . . . 4
Exit Codes . . . . . . . . . . . . . . . . . 4
USING LJprt In Menu Mode . . . . . . . . . . . 5
Function Key Assignments . . . . . . . . . . 5
Specifying Files To Print . . . . . . . . . 5
Printing A File Info Header . . . . . . . . 5
Printing The File . . . . . . . . . . . . . 5
Ejecting A Page From The Printer . . . . . 6
Selecting Print Options . . . . . . . . . . 7
Keys To Remember . . . . . . . . . . . . . 7
SELECTING PRE-DEFINED PRINT FORMATS . . . . . . 8
User Defined (Custom) Configurations . . . . 8
Printer Default Printing (Printer Reset) . . 9
Preset Fonts . . . . . . . . . . . . . . . . 9
Preset Page Layouts . . . . . . . . . . . . . 9
SELECTING A FONT . . . . . . . . . . . . . . . 10
Crash Course On LaserJet Font Selection . . . 10
Symbol Set . . . . . . . . . . . . . . . . . 10
Spacing Mode . . . . . . . . . . . . . . . . 11
Pitch . . . . . . . . . . . . . . . . . . . . 11
Point Size . . . . . . . . . . . . . . . . . 11
Style . . . . . . . . . . . . . . . . . . . . 11
Weight . . . . . . . . . . . . . . . . . . . 11
Type Face . . . . . . . . . . . . . . . . . . 12
SELECTING A PAGE LAYOUT . . . . . . . . . . . . 13
Crash Course ON LaserJet Page Layout . . . . 13
Orientation . . . . . . . . . . . . . . . . . 14
Vertical Motion Index . . . . . . . . . . . . 14
Top Margin . . . . . . . . . . . . . . . . . 14
Text Length . . . . . . . . . . . . . . . . . 15
Horizontal Motion Index . . . . . . . . . . . 15
Left Margin . . . . . . . . . . . . . . . . . 15
Right Margin . . . . . . . . . . . . . . . . 16
SELECTING JOB CONTROL PARAMETERS . . . . . . . 17
Paper Size . . . . . . . . . . . . . . . . . 17
Number Of Copies . . . . . . . . . . . . . . 17
Specialized Printing . . . . . . . . . . . . 17
USING SPECIALIZED PRINT COMMANDS . . . . . . . 18
Crash Course On HP PCL Command Syntax . . . . 18
MANAGING CUSTOM PRINT CONFIGURATIONS . . . . . 21
Saving, Recalling, Deleting and Renaming . . 21
APPENDIX . . . . . . . . . . . . . . . . . . . 23
LJprt User's Manual (c) Copyright 1991 J. Lawrence Nafziger
LJprt - HP LaserJet Text File Print Utility _______________________
DESCRIPTION
LJprt prints plain ASCII or DOS format text files while putting the
versatile features of your LaserJet printer to work. Through easy
single keystroke menu selections quickly select pre-defined fonts
and page layouts or select individual printer commands. Choose
from a library of pre-programmed option codes for a print command
or enter infrequently used codes manually for specialized needs.
LJprt saves complex print configurations for easy recall later.
LJprt runs in a menu driven interactive mode or runs in an auto-
matic mode as a DOS command or in a batch file. The program works
with the Hewlett Packard LaserJet II or III series laser printers
but should work with any printer conforming to the HP PCL printer
language definition.
DISCLAIMER
Use of the LJprt program acknowledges this disclaimer of warranty:
The LJprt program is supplied "as is" without warranty of any kind,
either express or implied, including, but not limited to, the
implied warranties of merchantability and of fitness of the program
for any purpose. The entire risk related to the quality and per-
formance of the program is on you. The author reserves the right
to do the absolute minimum provided by law, up to and including
nothing.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 1 -
LJprt - HP LaserJet Text File Print Utility _______________________
STARTING LJprt
To start LJprt from the DOS prompt, type the following command:
(Please note that items in square brackets are optional.)
LJPRT [FileName.ext] [/Options] [>NUL]
Where:
LJPRT - DOS command to run the file printing utility.
[FileName.ext] - Optional file name of file to print, can include
the DOS wild card characters "*,?" to print a
family of files.
[/Options] - One or more option "switches" to select pre-
defined printing formats. Causes LJprt to enter
automatic mode. All switches begin with the
forward slash (/).
/1 thru /10 - Print using one of ten user defined
print definitions.
/R - Reset printer
/C - Print in Courier font at 10 pitch
/U - Print in Courier font at 12 pitch
/N - Print in Line Printer font a 16.67 pitch
/P - Print in Portrait orientation
/L - Print in Landscape orientation
/H - Print Header on first page showing the file
name and creation date and time.
/F - Send a Form Feed command to the printer to
eject an unprinted page of data.
>NUL - Optional DOS redirection to the NUL device. Used
to suppress LJprt screen output during batch file
execution if desired.
LJprt has two modes of operation determined by how it is started.
If no /Option switches are specified, LJprt starts in a menu driven
interactive mode. When at least one option switch is specified,
LJprt runs automatically without operator intervention to print a
file as specified by the options.
QUITTING LJprt
When LJprt is started in the interactive mode, any of the following
keys quit LJprt and return you to the operating system: [F10],
[Alt-X], [Esc]. Additionally [Ctrl-Break] will abort the program
and return to the operating system in either the menu or automatic
modes.
(Command line examples on next page)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 2 -
LJprt - HP LaserJet Text File Print Utility _______________________
COMMAND LINE EXAMPLES:
LJPRT
Starts LJprt in interactive menu mode. The file to print and print
options are specified from the menu.
LJPRT FILE.TXT
Starts LJprt in interactive menu mode. The file to print is taken
from the command line. Print options are selected from the menu.
LJPRT FILE.TXT /R/C/P
Runs LJprt in automatic mode to reset the printer and print the
file FILE.TXT in a Courier font at 10 pitch in Portrait orienta-
tion.
LJPRT C:\DOCS\FILE.TXT /R/C/P >NUL
Same as above except a complete path is specified. Additionally,
screen output is suppressed by redirecting it to the DOS NUL
device.
LJPRT /2
Runs LJprt in automatic mode to preset the printer to user defined
print definition number two. Only the printer commands are sent to
the printer, as no file was specified.
LJPRT /R
Runs LJprt in automatic mode to reset the printer as if the [Reset]
button was pressed on the printer's control panel. No file is
printed.
EXAMPLE PRINT SESSION WITHIN dBASE
!LJPRT /R/N/L
REPORT FORM MYREPORT TO PRINT
The first line runs LJprt within dBASE to preset the printer for a
report. In this example the option switches cause LJprt to run
automatically to preset the printer to a LinePrinter font and
Landscape page orientation and return to dBASE. The second line is
a typical dBASE command to print the report.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 3 -
LJprt - HP LaserJet Text File Print Utility _______________________
USING LJprt IN AUTOMATIC MODE
This section describes using LJprt in its automatic or batch file
mode. As used in this manual, "Automatic" and "Batch File" mode
are synonymous and refer to the same mode of operation.
To put LJprt in automatic mode, specify at least one command line
switch option to the LJPRT command. The switches signal LJprt to
go into automatic mode. The options tell LJprt what to do in place
of interactive menu selections. Please refer to "Starting LJprt"
for a list of the available command line switches.
The /F switch functions to eject an unprinted page from the
printer. The switch performs the same function as the [F2] key
from the menu. This switch is ignored if used in combination with
other switches. It must be used alone.
Most of the other switches correspond to the pre-defined printing
menu options to specify a font and page layout for printing the
file. Command line switches are processed from left to right. Be
wary of using other preset printing switches placed after a switch
for a user defined configuration unless you actually want to alter
the designated user defined configuration. A user defined configu-
ration switch is typically used alone.
Specifying a file to print is optional. If omitted, only the
printer commands for the designated options are sent to the
printer. This is handy for shelling out of an application program
to set up the printer for the required printing need and returning
to the application to print from within the application. When no
file name is given, the /H switch is ignored. (/H prints a file
info header.)
During printing, LJprt shows the status of the print job. To
suppress this screen output, use DOS redirection to redirect the
output to the NUL device. You may want to do this when using LJprt
in a batch file.
LJprt returns the following exit codes that may be tested with the
IF ERRORLEVEL batch command:
0 - Successful Completion
2 - File Not Found
3 - Path Not Found
4 - Too Many Files Open
5 - Access Denied
201 - Non-Existent Command Line Switch Specified
202 - Custom Print Configuration Is Undefined
255 - Insufficient Memory To Run LJprt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 4 -
LJprt - HP LaserJet Text File Print Utility _______________________
USING LJprt IN MENU MODE
The following sections describe using LJprt interactively from the
menus.
FUNCTION KEY ASSIGNMENTS
HELP - [F1]
The [F1] key provides basic on-line help. Two screens of help
are selected by repeated presses of the [F1] key, [Page] Cursor
keys or the [Space Bar]. The [Esc] key leaves help. Menu
selections may be made directly from the Help window.
FILE NAME - [F3]
The [F3] key enters the name of a file to print. The file name
may contain the DOS wild card characters "*,?" to print a fam-
ily of files. LJprt adds the default drive and directory path
name if a drive or path is not specified. The file to print
may be supplied also on the DOS command line when starting
LJprt.
PRINT FILE INFO HEADER - [F4]
The [F4] key inserts a two line header on the first page. The
header includes the complete path and name of the file and its
creation/modification date and time.
EDIT PRINT OPTION - [F6]
This function is fully described in the "Selecting Print
Options" section. It is listed here for completeness.
MANAGE CUSTOM PRINT CONFIGURATIONS - [F7]
Provides access to functions for working with and managing user
defined configurations. The "Managing Custom Print Configura-
tions" section describes these functions.
SAVE CURRENT CONFIGURATION - [F8]
This function is fully described in the "Selecting Pre-Defined
Print Formats" section. It is listed here for completeness.
PRINT - [F9]
The [F9] key starts printing the specified file. Printer com-
mands for the selected print options are sent first followed by
any special option commands followed by the text of the file to
print. The name of the file being printed and a countdown of
characters to print are displayed.
Pressing the [Esc] key at any time aborts sending data to the
printer and returns you to the Main window. Pressing any other
key suspends sending data to the printer and prompts to resume
or abort.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 5 -
LJprt - HP LaserJet Text File Print Utility _______________________
QUIT LJprt - [F10]
The [F10] key quits the LJprt session and returns you to the
operating system.
EJECT PAGE FROM PRINTER - [F2]
The [F2] key sends a Form Feed command to the printer to print
and eject the final page of a previous print job not yet
printed. Unlike other print options, this key executes immedi-
ately. The Form Feed command is not part of a print configura-
tion definition. This feature is provided for convenience to
print and eject text not yet printed.
On some LaserJet printers this command works only if text pre-
viously sent to the printer has not yet been printed. This
avoids ejecting a blank page.
On LaserJet printers, the printer Reset command performs a
similar function. It prints and ejects the final page left
over from a previous print job before resetting the printer.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 6 -
LJprt - HP LaserJet Text File Print Utility _______________________
SELECTING PRINT OPTIONS
The Main window lists the LJprt print options in groups according
to their functionality for:
Pre-defined printing
Font Definition
Page Layout
Job Control
The pre-defined printing group provide single keystroke selection
of sets of printer commands defined for common fonts, page orienta-
tion, and user defined configurations. The "Selecting Pre-defined
Print Formats" section describes these options in detail.
The Font Definition group are the attributes that define a LaserJet
font. These are discussed in detail in the "Selecting A Font"
section.
The Page Layout group are the parameters that define a LaserJet
text layout for the printed page. These are discussed in detail in
the "Selecting A Page Layout" section.
The Job Control group are infrequently used options to select a
paper size, the number copies, and printer commands for specialized
printing needs. These are discussed in detail in the "Selecting
Job Control Options" section.
KEYS TO REMEMBER
[Hot Keys] - Selects or deselects an option through an alternate
action. Moves the cursor directly to the option with a single
keystroke.
[Down Arrow] and [Up Arrow] - Moves the cursor sequentially about
the menu options.
[Tab], [Shft-Tab], [Right Arrow] and [Left Arrow] - Moves the
cursor forward or backward to the next option group.
[Enter] - SELECT - Selects or deselects the print option indicated
by the cursor through an alternate action.
[Space Bar], [+], [-] - LIST LIBRARY VALUE - Selects the next
sequential entry in a library of possibilities for the print
option indicated by the cursor. The [-] key selects backward.
The [+] and [-] keys are the grey keys to the right of the
numeric key pad. Not all print options have a library. For
these options, these keys behave like the [Enter] key and
toggle the option ON/OFF.
[F6] - EDIT PRINT OPTION - Edits the value of the print option
indicated by the cursor. This provides the facility to enter
quantitative values or infrequently used printer command codes
that are not supported in an option's library.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 7 -
LJprt - HP LaserJet Text File Print Utility _______________________
SELECTING PRE-DEFINED PRINT FORMATS
The Pre-DEFINED PRINTING window lists options that select sets of
printer commands defined for: custom needs, frequently used fonts,
and page orientations. Select these options in combination to
describe how you want the file printed.
The configuration's name is displayed and serves to identify a
recalled user defined configuration. Any action that changes the
recalled configuration renames it to "UnNamed".
The FONT DEFINITION and PAGE LAYOUT windows show the print commands
and their pre-defined settings for the selected option. The pre-
defined font settings are matched for a type face and pitch. The
pre-defined page layouts specify a page orientation with margins
for common text layouts. You may find it convenient to use a pre-
defined option as a base from which to make changes.
As used in this manual, "Configuration" means the set of selected
print options defined for a particular printing need. The phrases
"User Defined Configuration" and "Custom Configuration" are
synonymous and refer to the set of options saved for recall later.
USER-DEFINED CONFIGURATION SELECTIONS
[F8] - SAVE CONFIGURATION - Saves the entire set of selected print
options as a user defined configuration to the next unassigned
number key. Entering a name for the configuration at the
prompt saves the configuration to disk. Recall the configura-
tion later by the number key under which it was saved.
[1] thru [9] & [0] - RECALL CUSTOM CONFIGURATION - Recalls a user
defined configuration saved under the number key pressed.
These are the top row number keys. The [0] key recalls config-
uration 10.
NOTE: LJprt comes with three custom configurations already
defined. You may of course redefine them. Configurations 1
and 2 change the default Roman8 symbol set to PC-8 that
matches the PC's symbol set. Configuration 3 prints docu-
ments written for 10 CPI at 12 CPI so that an eight column
left margin can be inserted. (This configuration requires 12
CPI fixed spaced courier font that is not standard on early
printers.)
[K] or [F7] - MANAGE CUSTOM CONFIGURATIONS - Provides access to
functions for working with and managing user defined configura-
tions. The "Managing Custom Print Configurations" section
describes these functions.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 8 -
LJprt - HP LaserJet Text File Print Utility _______________________
PRINTER DEFAULT PRINTING
R - RESET PRINTER - This option resets the printer to its "User
Default Environment". The phrase "User Default Environment"
refers to the settings set in locally at the printer using its
control panel. This option, when used by itself, prints the
file using the last manually entered control panel settings.
The Reset option works a little differently from other LJprt
options. When turned ON, it automatically turns OFF any other
options that may be selected. This prevents these options from
overriding the reset defaults. You may find it convenient to
first use Reset to establish a base print environment and then
setting selected options from their reset default. Turning the
Reset option OFF leaves other selected print options as is.
PRESET FONT SELECTIONS
C - COURIER PICA - This option selects a courier type face at 10
Characters-Per-Inch pitch (pica spacing).
U - COURIER ELITE - This option selects a courier type face at 12
Characters-Per-Inch pitch (elite spacing).
NOTE: This selection requires 12 CPI fixed spaced courier
font that is not a standard internal font on some printers.
N - LINE PRINTER - This option selects a LinePrinter type face at
16.67 Characters-Per-Inch pitch.
PRESET PAGE LAYOUT SELECTIONS
P - PORTRAIT - This option selects the portrait page orientation
and default margins.
L - LANDSCAPE - This option selects the landscape page orientation
and default margins.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 9 -
LJprt - HP LaserJet Text File Print Utility _______________________
SELECTING A FONT
CRASH COURSE ON LASERJET FONT SELECTION
A LaserJet font is characterized and selected by seven attribute
parameters:
Symbol Set
Character Spacing Mode
Pitch
Point Size
Style
Stroke Weight
Type Face
By specifying a unique set of values for each parameter, a unique
font is defined. Any attribute not explicitly specified, implies
using the attribute last used in the printer. Merely specifying a
particular font attribute does not guarantee printing with that
attribute, however. Arbitrarily specifying an attribute for which
no font exists, will not produce the expected results. When the
printer cannot find a font matching a specified attribute, it
either selects a font with the next closest attribute value or the
current attribute is retained.
USING LJprt TO SELECT A FONT
The FONT DEFINITION window lists the parameters that define a
font. For convenience, most of these parameters have attribute
libraries with the PCL codes that select popular attributes. The
[Space Bar] selects among the library entries. Cycling through the
choices however makes it tempting to select an attribute for which
your printer is not endowed. Making a valid choice requires a
knowledge of the fonts available in your printer.
When you need a font attribute that is not listed in a library, use
the [F6] key to enter it manually. Obtain the required codes from
the printer or font product documentation.
Following are descriptions of each font parameter. Each includes
the factory default value, whether an LJprt library is available
from which to choose, and how the printer handles attribute selec-
tions that are not available. The maximum range of accepted values
is given also.
B - SYMBOL SET - This attribute selects a specific symbol set in a
font. The [Space Bar] selects a symbol set from the library.
Use [F6] to enter specialized symbol set codes not in the
library. If the selected Symbol Set does not exist in your
printer, the Factory Default or User Default Symbol Set is
selected. The HP printer and font product documentation
describe some of the available symbol sets.
Default = 8U (Roman-8)
Range = N/A
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 10 -
LJprt - HP LaserJet Text File Print Utility _______________________
S - SPACING MODE - This attribute specifies whether the inter-
character spacing is Proportional or Fixed. The [Space Bar]
selects the spacing mode.
Default = 0 (Fixed Spacing)
Range = 0, 1 (other values ignored)
T - PITCH - This attribute specifies the number of Characters-Per-
Inch for a fixed-spaced font. The [Space Bar] selects common
pitches from the library. Use [F6] to enter specialized
pitches. If a fixed-spaced font is unavailable at the speci-
fied pitch, the font with the closest pitch is selected. When
proportional spacing is specified, this parameter is ignored.
Default = 10 (10 Chars/Inch)
Range = >0.10 -- 576 (The supported PCL range for
fixed-spaced scalable fonts.)
I - POINT SIZE - This attribute specifies the height of the font in
points. A PCL typographic point is 1/72 inch. Use [F6] to
enter the desired point size. If a font is unavailable at the
specified point size, the font with the closest size is
selected. When a fixed-spaced scalable font is selected, this
parameter is ignored. (The LaserJet determines the point size
for these fonts from the Pitch setting.)
Default = 12 (12 points)
Range = 0.25 -- 999.75 (The supported PCL range for
scalable fonts.)
Y - STYLE - This attribute specifies Italic or Upright posture for
the characters. It also specifies the width and structure of
the characters. The [Space Bar] selects style codes from the
library. Use [F6] to enter specialized style codes not in the
library. Style selection requires an exact match, otherwise
this attribute is ignored. The HP printer and font product
documentation describe some of the style attributes.
Default = 0 (Upright, solid)
Range = 0 -- 255 (Prior to LaserJet IID)
0 -- 32767 (LaserJet IID and later)
W - WEIGHT - This attribute specifies the thickness of the strokes
in the design of the font. The [Space Bar] selects common
stroke weight values. Other values are defined for the Laser-
Jet III and may be entered using [F6]. A value of zero corre-
sponds to Medium weight. Positive values specify degrees of
Bold weights. Negative values specify degrees of Light
weights. If a weight is unavailable to the degree specified,
the font with the closest weight is selected.
Default = 0 (Medium)
Range = +7 (Boldest) to -7 (Lightest)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 11 -
LJprt - HP LaserJet Text File Print Utility _______________________
F - TYPE FACE - This attribute specifies the design of the font.
The [Space Bar] selects common type faces from the library.
Use [F6] to enter specialized type face codes not in the
library. Type Face selection requires an exact match, other-
wise this parameter is ignored. The HP printer and font prod-
uct documentation describe some of the available symbol sets.
Default = 3 (Courier)
Range = 0 -- 255 (Prior to LaserJet IID)
0 -- 32767 (LaserJet IID and later)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 12 -
LJprt - HP LaserJet Text File Print Utility _______________________
SELECTING A PAGE LAYOUT
CRASH COURSE ON LASERJET PAGE LAYOUT
A LaserJet page layout is controlled by eight parameters:
Paper Size
Page Orientation
Vertical Motion Index
Top Margin
Text Length
Horizontal Motion Index
Left Margin
Right Margin
These parameters define a permissible area for printing text known
as the "Text Area". The size of the text area is controlled as
follows: The intersection of the Top and Left margins define the
upper left corner of the text area on the page. The "Text Length"
sets the vertical size, in lines, of the text area that in turn
defines the bottom margin for the page. The specified Paper Size
and its Orientation set the maximum number of printed lines and
columns for the page. The width of the Bottom margin is implicitly
set to the space remaining on the physical page after printing the
top margin plus the text area.
The right and left margins determine the maximum permissible width
of the text area. Text lines longer than this width are truncated
at the right margin (unless End-Of-Line wrap is enabled).
Print positions are specified relative to a "Logical Page". For a
given page orientation, the logical page always spans the entire
height of the paper but is always slightly narrower than its width
(typically by 1/4" at each edge). The width of the logical page is
fixed and determined by the selected paper size and the printer
model. Since the logical page is narrower than the physical page,
specification of the left and right margins require adjustments to
achieve desired margin widths on the paper.
Another area on the LaserJet that affects printing is the "Print-
able Area". The printable area lies within the physical page and
leaves an unprintable perimeter area around all four edges of the
paper. The bounds of the printable area are fixed and determined
by the selected paper size and the printer model.
The width of the logical page always lies within the printable area
and presents no problem. Since the height of the logical page
spans the entire height of the paper, it overlaps into the unprint-
able areas at the top and bottom of the paper. The inability to
print on the very top and bottom lines of the paper requires a
conscious effort when programming the top margin and text length to
avoid printing in these areas. Otherwise printed data loss will
occur. As a thumb rule, avoid printing on the very top and bottom
two lines of the page (at 6 lines/inch).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 13 -
LJprt - HP LaserJet Text File Print Utility _______________________
USING LJprt TO DEFINE A PAGE LAYOUT
The PAGE LAYOUT window lists the options that set up a page layout:
Page Orientation
Vertical Motion Index
Top Margin
Text Length
Horizontal Motion Index
Left Margin
Right Margin
LJprt's pre-defined page layouts set 1/2" top and bottom margins (3
lines). They may be changed to suit specific needs.
Following are descriptions of each page layout parameter. Each
includes the factory default value and whether an LJprt library is
available from which to choose. The maximum range of accepted
values is given also.
O - ORIENTATION - Sets the default print direction on the physical
page. The [Space Bar] selects one of the four orientations
from the library.
Default = 0 (Portrait)
Range = 0 -- 3 (Up to PCL 5, other values ignored)
NOTES: On early PCL printers, orientation was also a font
selecting attribute. Newer printers now automatically rotate
all fonts to the required orientation.
This command when used by itself resets the page length, top
margin, text length, left and right margins, vertical and
horizontal motion indexes to their user default values for
the specified page orientation.
V - VERTICAL MOTION INDEX - This option sets the Vertical Motion
Index (VMI) in terms of Lines-Per-Inch. Use [F6] to enter the
Lines-Per-Inch setting.
Default = 6 (LPI = 6)
Range = 0.0714 -- 48 (14" / line -- 48 LPI)
G - TOP MARGIN - This option designates the number of lines between
the top of the paper and the top of the text area. Use [F6] to
enter the top margin setting in lines.
Default = 3 (3 lines)
Range = 0 -- Page Length (Other values ignored)
NOTES: The printer works internally in inches and calculates
the top margin distance using the current VMI setting by:
Top Margin (inches) = Top Margin (lines) * VMI / 48
The Top Margin command also does an implicit Text Length
recalculation internal to the printer to reserve a default
1/2" bottom margin by: (all terms in inches)
Text length = Page length - Top Margin - 0.5
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 14 -
LJprt - HP LaserJet Text File Print Utility _______________________
X - TEXT LENGTH - This option designates the number of lines
available for printing on the page. It defines the length of
the text area that starts after the top margin. Use [F6] to
enter the text area length in lines.
Default = Page Length - Top Margin - 0.5"
Range = 0 -- Page Length - Top Margin
NOTES: The printer works internally in inches and calculates
the text length distance using the current VMI setting by:
Text Length (inches) = Text Length (lines) * VMI / 48
H - HORIZONTAL MOTION INDEX - This option sets the Horizontal
Motion Index (HMI) in terms of Characters-Per-Inch (pitch).
Use [F6] to enter the Characters-Per-Inch setting.
Default = Determined by the current font (Typ CPI = 10)
Range = 0.0714 - 120 (14" / Char -- 120 CPI)
NOTES: The selected font establishes the default HMI set-
ting. It is set to the design value for the font whenever a
font attribute is changed. Use this option to override the
default setting. For fixed-pitch fonts, the setting controls
the spacing of all characters. For proportionally spaced
fonts, the setting only affects the distance of the space and
back space characters.
It is normally not necessary to change the HMI setting from
the font's design value and therefore is not automatically
selected with LJprt's pre-defined page layouts.
E - LEFT MARGIN - This option designates the number of columns
between the left edge of the paper to the first column of text
on the line. Use [F6] to enter the left margin setting in
columns.
Default = 0 (No left margin)
Range = 0 -- Right margin column setting.
NOTES: This option is not automatically selected with
LJprt's pre-defined page layout options.
The printer works internally in inches and calculates the
left margin distance from the current HMI setting by:
Left Margin (inches) = Left Margin (columns) * HMI / 120
The left margin is technically referenced to the left bound
of the Logical Page vice the physical edge of the paper.
This requires an adjustment to achieve a desired margin width
on the paper.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 15 -
LJprt - HP LaserJet Text File Print Utility _______________________
RIGHT MARGIN - This option designates the number of columns between
the left edge of the paper to the last column of text on the
line. Use [F6] to enter the right margin setting in columns.
Default = Maximum columns/line
Range = Left margin setting -- Maximum columns/line
(other values ignored)
NOTES: Specifying a right margin is primarily used for
specialized printing needs to limit printing within the
bounds of the right margin. It is normally not necessary to
change the default right margin setting and therefore is not
automatically selected with LJprt's pre-defined page layouts.
The printer works internally in inches and calculates the
distance to the right margin using the current HMI setting
by:
Right Margin (inches) = Right Margin (columns) * HMI / 120
The width of the text area is calculated by: (all terms in
inches)
Text Area Width = Right Margin - Left Margin
Unless End-Of-Line wrap is enabled, lines longer than the
text area width are truncated at the right margin. The PCL
command to enable End-Of-Line wrap is given as an example in
the "Using Specialized Print Commands" section. The right
margin is technically referenced to the left bound of the
Logical Page vice the physical edge of the paper. This
requires an adjustment to achieve a desired margin width on
the paper.
There is no Hot Key for this option.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 16 -
LJprt - HP LaserJet Text File Print Utility _______________________
SELECTING JOB CONTROL OPTIONS
The JOB CONTROL window lists print options to specify a paper size
or the number of copies to print. Print commands for specialized
printing can be entered also. The following describe these
options.
Z - PAPER SIZE - This option designates the size of the paper for
printing. It also designates the size of envelopes. The
[Space Bar] selects a paper size from the library. The library
contains the entire range of sizes recognized up to the Laser-
Jet III. When a selection differs from that of the installed
paper tray size, the LaserJet prompts to install the specified
paper size.
Default = 2 (Letter 8 1/2" x 11")
Range = 1, 2, 3, 26, 80, 81, 90, 91 (others ignored)
M - NUMBER OF COPIES - This option designates the number of printed
copies of each page. Use [F6] to enter the desired number of
copies.
Default = 1
Range = 1 -- 99
A - SPECIAL - This option provides the facility send any printer
command to the printer. Use [F6] to enter the printer command
or commands. This option requires a knowledge of the PCL
printer command language. Refer to the printer documentation
for a list of the PCL commands. Please see "Using Specialized
Print Commands" for a brief description of the PCL command
syntax.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 17 -
LJprt - HP LaserJet Text File Print Utility _______________________
USING SPECIALIZED PRINT COMMANDS
The LaserJet and the PCL printer language offer extreme flexibility
in controlling printed output. LJprt exercises only a subset of
the PCL commands useful for routine printing needs. For special-
ized printing needs, LJprt provides a catch all means to send any
printer command to the printer using the Special option in the Job
Control window.
The Special option requires a knowledge of the PCL printer command
language. Refer to the printer documentation for a list of the PCL
commands.
NOTE: The printer commands require entering characters not
found on the keyboard. The ASCII Escape control code for
instance. An alternative way to enter any ASCII code,
including the control codes and characters belonging to upper
half of the character set, is by the numeric key pad in con-
junction with the [Alt] key. While holding the [Alt] key
depressed, sequentially type the digits of the ASCII code on
the numeric key pad. Releasing the [Alt] key enters the
character.
EXAMPLE: Enter the ASCII Escape control code (decimal 27).
- Press and hold the [Alt] key.
- Type 0 (Leading 0s may not be necessary on some computers.)
- Type 2
- Type 7
- Release the [Alt] key which enters the character. The
Escape character shows on screen as a left pointing arrow.
CRASH COURSE ON HP PCL COMMAND SYNTAX
All PCL printer commands begin with the ASCII Escape character and
sometimes are called "Escape Sequences". Some commands that do not
take an argument value are two character sequences. Most commands
take a parameter value and are of varying lengths. These commands
are called "Parameterized Escape Sequences".
Some ground rules are:
* PCL commands always begin with the ASCII Escape (decimal 027).
* PCL commands are ASCII character strings and are case sensi-
tive.
* Numeric values are entered as ASCII digits, not in binary form.
* Omission of the Value Field is permissible and is taken as a
value of zero.
* PCL commands usually end in a letter that is ALWAYS in upper
case.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 18 -
LJprt - HP LaserJet Text File Print Utility _______________________
PCL Parameterized printer commands are structured commands in the
form of: (Spaces for clarity)
<Esc> X g #p #p ... #P [Data]
Where:
<Esc> - ASCII ESCAPE CHARACTER - Indicates a printer command escape
sequence follows.
X - PARAMETERIZED CHARACTER - Indicates the escape sequence is a
parameterized command. Its ASCII value is always within the
range of 33 - 47 decimal (! thru /) that includes mostly sym-
bols.
g - GROUP CHARACTER - Specifies the control group the printer
command belongs to. Its ASCII value is always within the range
of 96 - 126 decimal (` thru ~) that includes the lower case
letters.
# - VALUE FIELD - A string of ASCII digits in the range of 48-57
decimal (0 thru 9) that may be preceded by a + or - sign, and
contain a fractional portion indicated by digits following a
decimal point. The maximum value range is +32767 to -32767.
p - PARAMETER CHARACTER - Specifies the control parameter to which
the preceding value applies. Its ASCII value is always within
the range of 96 - 126 decimal (` thru ~) that includes the
lower case letters.
PCL commands having the same Parameterized character and Group
characters may be combined to form a single composite escape
sequence. When doing this, the Parameterized and Group codes
of the second and subsequent commands are redundant and are
omitted. Only the Value Field and the Parameter character of
the individual commands are combined (strung together) to form
the escape sequence.
P - TERMINATING CHARACTER - Specifies the control parameter to
which the preceding value applies. This character is a special
form of a Parameter character used when it is the last charac-
ter of the escape sequence. It marks the end of the sequence
to the printer. Its ASCII value is always within the range of
64 - 94 decimal (@ thru ^) that includes the upper case let-
ters.
NOTE: The Parameter and Terminating characters are the same
letter and convey the functionality information intended by
the character. They differ only in the case of the letter.
As a Terminating character, it is in upper case to indicate
the end of the escape sequence. As a Parameter character, it
is in lower case to indicate the escape sequence is combined
and another command follows. Escape sequences for combined
commands will then consist of lower case letters throughout
except the last Terminating character that is upper case.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 19 -
LJprt - HP LaserJet Text File Print Utility _______________________
[Data] - EIGHT BIT BINARY DATA - For commands that take binary
data, this data immediately follows the Terminating character
of the escape sequence. The value field of the command speci-
fies the number of data bytes that follow. Commands that take
binary data are primarily those for downloading fonts and
graphic data to the printer.
EXAMPLES:
SINGLE PARAMETERIZED PRINTER COMMAND. This example turns End-Of-
Line wrap ON.
<Esc> & s 0 C (spaces for clarity)
| | | | |
| | | | ^--- Terminating character. (Note upper case letter)
| | | ^--- Value Field. (ASCII numeric value. Zero turns End-
| | | Of-Line wrap ON.)
| | ^--- Control Group code. (Note lower case letter)
| ^--- Parameterized code character. (Usually a symbol)
^--- ASCII Escape character. (Identifies beginning of escape
sequence)
SINGLE PARAMETERIZED PRINTER COMMAND. This example is the comple-
mentary command to turn End-Of-Line wrap OFF.
<Esc> & s 1 C (spaces for clarity)
|
^--- Value Field. (ASCII numeric value. One turns End-
Of-Line wrap OFF.)
COMBINED PARAMETERIZED PRINTER COMMAND. This example selects a 10
pitch, 12 point, Upright, Medium weight, Courier font.
<Esc> ( s 0 p 10.0 h 12.0 v 0 s 0 b 3 T (spaces for clarity)
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | ^-- Terminating character.
| | | | | | | | | | | | | | (Note upper case letter)
| | | | ^-|----^-|----^-|-^-|-^-|---- Parameter characters.
| | | | | | | | | (Note lower case letters)
| | | ^---^------^------^---^---^---- Value Fields. (ASCII
| | | numeric characters)
| | ^--- Control Group code. (Note lower case letter)
| ^--- Parameterized code character. (Usually a symbol)
^--- ASCII Escape character. (Identifies beginning of escape
sequence)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 20 -
LJprt - HP LaserJet Text File Print Utility _______________________
MANAGING CUSTOM PRINT CONFIGURATIONS
Many printing needs will likely be done using similar printing
requirements or preferences. To make it easier to select
frequently used print options, LJprt saves a set of defined print
options for single keystroke recall later.
User defined configurations are managed through a Pop-Up CUSTOM
CONFIGURATION window that lists the saved configurations and pro-
vides a sub-menu of functions to work with them. Up to ten user
defined configurations may be saved and are kept in a file named
CFG_INFO.LJP. When operating under DOS version 3 or later, this
file resides in the same directory from which the LJPRT.COM program
file was loaded. Otherwise, it is saved in the root directory of
the document disk. This file comes with three configurations
already defined which may of course be changed for your needs.
This section describes the LJprt facilities to manage user defined
print configurations from the Custom Configuration window.
[Down Arrow] or [Up Arrow] - Moves the selector bar to select a
configuration.
[1] thru [9] & [0] - SELECT CUSTOM CONFIGURATION - Moves the
selector bar directly to a configuration number. These are the
top row number keys. The [0] key selects configuration 10.
NOTE: These keys work from both the main menu and the
configuration menu but function slightly differently in
each. From the main menu, they function as "speed recall"
keys to recall a user defined configuration by its number in
a single keystroke.
[Enter] or [K] - RECALL CUSTOM CONFIGURATION - Recalls the
configuration under the selector bar and returns you to the
Main window. Use the [Cursor] or [Number] keys to first select
the configuration of your choice.
NOTE: The [K] key works from both the main menu and the
configuration menu but functions slightly differently in
each. From the main menu, it first pops up the Custom Con-
figuration window for configuration selection.
[S] or [F8] - SAVE CONFIGURATION - Saves the entire set of print
options defined in the Main window to the configuration under
the selector bar and returns you to the Main window. Use the
[Cursor] or [Number] keys to first select an unassigned config-
uration number for the configuration. Recall the configuration
later by the number under which it was saved either from the
keyboard or by a command line switch.
Configurations are given descriptive names to identify their
purpose. Entry of the name at the prompt saves the configura-
tion to disk.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 21 -
LJprt - HP LaserJet Text File Print Utility _______________________
NOTE: The [F8] key works from both the main menu and the
configuration menu but functions slightly differently in
each. From the main menu, it functions as a "speed save" key
by automatically finding the next unassigned configuration
number to save the configuration. From the configuration
menu, it allows you to first choose the configuration number
of your choice to save the configuration. The [S] key is an
alternative to the [F8] key but only works from the Custom
Configuration window.
[D] - DELETE CONFIGURATION - Deletes the configuration under the
selector bar.
[R] - RENAME CONFIGURATION - Renames the configuration under the
selector bar.
[Esc] - EXIT - Returns to the Main window without recalling a
configuration.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Page - 22 -
LJprt - HP LaserJet Text File Print Utility _______________________
DISTRIBUTION POLICY
The LJPRT.COM software and this document are a copyright-reserved
free program. You may use, copy and distribute this software free
of charge under the following conditions:
* The program and document files are not altered in any way.
* The copyright statements are not changed.
* Distribution is not for personal gain.
* The files of the original distribution package (listed below)
are distributed together.
READ_ME.BAT
LJPRT.DOC
LJPRT.COM
CFG_INFO.LJP
The author's original distribution file contains these files date
and time stamped 03-25-91 01:00:00 and comprise the complete
distribution package. The distribution file was created using the
Authenticity Verification feature of PKZIP and should report:
J. Lawrence Nafziger
SILVER DOLPHIN SOFTWARE
HOW TO CONTACT THE AUTHOR
Please address inquiries or questions via the following information
services:
CompuServe 73075,1474
GEnie J.Nafziger
Or mail to:
Mr. J. Lawrence Nafziger
PO. Box 8351
Norfolk, Virginia 23503-0351
REFERENCES
Hewlett Packard Company, PCL5 Printer Language Technical Reference
Manual, September 1990.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LJprt Ver 1.00
Appendix - 23 -